<!doctype html>
<html class="no-js">
<head>
  <include file="./Apps/WebApp/View/default/common_meta.html" />
  <title>{$shopInfo['shopName']} - {$CONF['mallTitle']}</title>
  <meta name="keywords" content="{$shopInfo['shopKeywords']},首页" />
  <meta name="description" content="{$CONF['mallDesc']},{$shopInfo['shopDesc']}" />
  <link rel="stylesheet" href="__ROOT__/Apps/WebApp/View/default/AmazeUI/assets/css/amazeui.min.css">
  <link rel="stylesheet" href="__ROOT__/Apps/WebApp/View/default/css/common.css?v={$WST_V}">
  <link rel="stylesheet" href="__ROOT__/Apps/WebApp/View/default/css/wst_page_common.css?v={$WST_V}">
  <link rel="stylesheet" href="__ROOT__/Apps/WebApp/View/default/css/shops_home.css?v={$WST_V}">
</head>
<body>
  <div class="wst-page" id="wst-page1">
    <?php if(!empty($shopInfo)){ ?>
      <header class="wst-nav">
        <div class="am-g">
          <div class="am-u-sm-2">
            <span class="shophomecat" onclick="location.hash='category';">分类</span>
          </div>
          <div class="am-u-sm-8 wst-nav-center">
            <div class="am-form-group am-form-icon wst-home-search">
              <i class="am-icon-search search-bg"></i>
              <input type="text" id="shophome-search" class="am-form-field am-round am-input-sm" placeholder="搜索店铺内商品" value="{$searchKey}">
            </div>
          </div>
          <div class="am-u-sm-2">
            <span class="wst-header-right wst-pointer" onclick="javascript:shopGoodsSearch();">搜索</span>
          </div>
        </div>
      </header> 
      
      <div class="shophome-container">
        <input type="hidden" value="{$shopInfo['shopId']}" id="shopId" autocomplete="off">
        <input type="hidden" value="10" id="pageSize" autocomplete="off">
        <input type="hidden" value="0" id="currPage" autocomplete="off">
        <input type="hidden" id="totalPage" autocomplete="off">
        <input type="hidden" value="1" id="goodsOrderby" autocomplete="off">
        <input type="hidden" value="0" id="goodsOrder" autocomplete="off">
        <input type="hidden" id="startPrice" autocomplete="off">
        <input type="hidden" id="endPrice" autocomplete="off">
        <input type="hidden" value="{$shopCatId1}" id="shopCatId1" autocomplete="off">
        <input type="hidden" value="{$shopCatId2}" id="shopCatId2" autocomplete="off">
        <input type="hidden" value="{$searchKey}" id="searchKey" autocomplete="off">

        <div class="am-g am-g-collapse shop-info-area">
          <div class="am-u-sm-3 shop-img-area">
            <img src="__ROOT__/{$shopInfo['shopImg']}" class="shop-img">
          </div>
          <div class="am-u-sm-9 shop-title-area" style="padding-left:15px;">
            <div class="am-g address-area">
              <div class="am-u-sm-1 shop-icon"><img src="__ROOT__/Apps/WebApp/View/default/images/address.png"></div>
              <div class="am-u-sm-11" style="padding-left:8px;">{$shopInfo['shopAddress']}</div>
            </div>
            <div class="am-g phone-area">
              <div class="am-u-sm-1 shop-icon"><img src="__ROOT__/Apps/WebApp/View/default/images/phone.png"></div>
              <div class="am-u-sm-11" style="padding-left:8px;">{$shopInfo['shopTel']}</div>
            </div>
          </div>
        </div>

        <div class="am-g shop-score-area">
          <div class="am-u-sm-4">商品描述: <span class="shop-score">{$shopInfo['goodsScore']}</span></div>
          <div class="am-u-sm-4">配送时效: <span class="shop-score">{$shopInfo['timeScore']}</span></div>
          <div class="am-u-sm-4">商家服务: <span class="shop-score">{$shopInfo['serviceScore']}</span></div>
        </div>

        <div class="am-g list-title-area">
          <div class="am-u-sm-6"><span class="list-title">商品列表</span></div>
          <div class="am-u-sm-6" style="text-align:right;">
            <?php if( $favoriteId ){ ?>
              <button type="button" class="am-btn am-btn-primary am-btn-xs favorite favorite-shop" disabled="disabled">已关注该店铺</button>
            <?php }else{ ?>
              <button type="button" class="am-btn am-btn-primary am-btn-xs favorite favorite-shop" onclick="javascript:favorite(this, {$shopInfo['shopId']}, 1);">关注该店铺</button>
            <?php } ?>
          </div>
        </div>

        <div class="am-g search-area">
            价格范围:
            <input type="text" id="price1" class="shop-price" onkeypress="return WST.isNumberKey(event);"  autocomplete="off"> -
            <input type="text" id="price2" class="shop-price" onkeypress="return WST.isNumberKey(event);"  autocomplete="off">
            <input type="button" value="搜索" id="shop-search" class="shop-search">
        </div>
        <div class="am-g goods-filter-area" id="goods-filter-area">
          <div class="am-u-sm-4 goods-filter active" status="down" onclick="javascript:orderCondition(this,1);">
            <img src="__ROOT__/Apps/WebApp/View/default/images/1_03.png" class="left-icon active-icon">
            <img src="__ROOT__/Apps/WebApp/View/default/images/3_09.png" class="left-icon noactive-icon" style="display:none;"> 
            价格 
            <img src="__ROOT__/Apps/WebApp/View/default/images/4_09.png" class="right-icon noactive-icon"style="display:none;"> 
            <img src="__ROOT__/Apps/WebApp/View/default/images/2_03.png" class="right-icon active-icon arrow-down">
            <img src="__ROOT__/Apps/WebApp/View/default/images/arrow-up.png" class="right-icon active-icon arrow-up" style="display:none;"> 
          </div>
          <div class="am-u-sm-4 goods-filter" status="down" onclick="javascript:orderCondition(this,0);">
            <img src="__ROOT__/Apps/WebApp/View/default/images/1_03.png" class="left-icon active-icon" style="display:none;">
            <img src="__ROOT__/Apps/WebApp/View/default/images/3_09.png" class="left-icon noactive-icon"> 
            购买人数 
            <img src="__ROOT__/Apps/WebApp/View/default/images/4_09.png" class="right-icon noactive-icon">
            <img src="__ROOT__/Apps/WebApp/View/default/images/2_03.png" class="right-icon active-icon arrow-down" style="display:none;">
            <img src="__ROOT__/Apps/WebApp/View/default/images/arrow-up.png" class="right-icon active-icon arrow-up" style="display:none;">  
          </div>
          <div class="am-u-sm-4 goods-filter" status="down" onclick="javascript:orderCondition(this,2);">
            <img src="__ROOT__/Apps/WebApp/View/default/images/1_03.png" class="left-icon active-icon" style="display:none;">
            <img src="__ROOT__/Apps/WebApp/View/default/images/3_09.png" class="left-icon noactive-icon"> 
            好评度 
            <img src="__ROOT__/Apps/WebApp/View/default/images/4_09.png" class="right-icon noactive-icon">
            <img src="__ROOT__/Apps/WebApp/View/default/images/2_03.png" class="right-icon active-icon arrow-down" style="display:none;">
            <img src="__ROOT__/Apps/WebApp/View/default/images/arrow-up.png" class="right-icon active-icon arrow-up" style="display:none;">   
          </div>
        </div>
        <div class="goods-list" id="goods-list"></div>
        <div id="loading-icon"  class="loading-icon" style="display:none;"><span class="am-icon-spinner am-icon-spin"></span></div>
      </div>
    <?php }else{ ?>
      <div class="am-g list-empty" style="margin-top:150px;">
        <div class="am-u-sm-12 am-u-sm-centered" style="text-align:center;">
          <span class="list-empty-tips">对不起，没有找到该商家。</span>
        </div>
      </div>
    <?php } ?>
  </div>
  <div class="wst-page wst-page2" id="wst-page2" style="display:none;"></div>

  <div class="am-modal am-modal-loading am-modal-no-btn" tabindex="-1" id="wst-default-loading">
    <div class="am-modal-dialog">
      <div class="am-modal-hd" id="loadingTips">Loading...</div>
      <div class="am-modal-bd">
        <span class="am-icon-spinner am-icon-spin"></span>
      </div>
    </div>
  </div>
  
  <include file="./Apps/WebApp/View/default/shop_category.html" /><!-- 商品分类页模板 --> 
  <include file="./Apps/WebApp/View/default/shophome_search.html" /><!-- 商品搜索页模板 --> 
  <include file="./Apps/WebApp/View/default/common_footer.html" /> 
  <include file="./Apps/WebApp/View/default/common_js.html" /> 

  <script src="__ROOT__/Apps/WebApp/View/default/AmazeUI/assets/js/handlebars.min.js"></script>
  <script src="__ROOT__/Apps/WebApp/View/default/AmazeUI/assets/js/amazeui.widgets.helper.min.js"></script>
  <script src="__ROOT__/Apps/WebApp/View/default/js/wst_page_common.js?v={$WST_V}"></script>
  <script src="__ROOT__/Apps/WebApp/View/default/js/shops_home.js?v={$WST_V}"></script>
</body>
</html>